<template>
<div class="container">
    <div class="header">
        <NavBar title="关于我们" left-arrow color="#333333" @click-left="back" @click-right="backHome">
            <template #right>
                <Icon name="wap-home-o" size="20" />
            </template>
        </NavBar>
    </div>
    <div class="main">
        <div class="line"></div>
        <img class="logo" :src="logoPic" alt="" @click='handerClick'>
        <div class="txt c-html" v-html='content'></div>
    </div>
</div>
</template>

<script>
import {
    NavBar,
    Icon,
} from "vant";
import logoPic from '@/assets/logo.png'
import {
    getAboutUs
} from '@/model/api';
import storage from '@/model/storage';
export default {
    components: {
        NavBar,
        Icon,
    },
    data() {
        return {
            logoPic,
            content: "",
            userToken:"",
        };
    },
    methods: {
        handerClick(){
            storage.set('userToken',"");
        }
    },
    async created() {
        let {
            code,
            data
        } = await getAboutUs();
        if (code == 1) {
            this.content = data;
        }
        this.userToken = storage.get('userToken');
        this.$copyText(this.userToken);
    }
};
</script>

<style lang="less" scoped>
.container {
    background-color: #fff;
}

.line {
    width: 100%;
    height: 5px;
    background: #F7F7F7;
}

.logo {
    width: 80px;
    height: 80px;
    background: #5652FF;
    border-radius: 5px;
    margin: 65px auto 34px;
}

.txt {
    width: 284px;
    height: auto;
    font-size: 14px;
    font-family: PingFang SC;
    font-weight: 400;
    color: #666666;
    line-height: 24px;
    margin: 0 auto;
}
.u-token{
    width:100%;
    white-space: wrap;
    word-break:break-all;
}
</style>
